home *** CD-ROM | disk | FTP | other *** search
/ Aminet 6 / Aminet 6 - June 1995.iso / Aminet / dev / c / LEDA_GUI.lha / files.lha / src / amiga / impl_x_basic.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-07  |  3.1 KB  |  111 lines

  1. /*******************************************************************************
  2. +
  3. +  LEDA  3.1.2
  4. +
  5. +
  6. +  x_basic.h
  7. +
  8. +
  9. +  Copyright (c) 1995  by  Max-Planck-Institut fuer Informatik
  10. +  Im Stadtwald, 66123 Saarbruecken, FRG     
  11. +  All rights reserved.
  12. *******************************************************************************/
  13.  
  14.  
  15. #ifndef LEDA_X_BASIC_H
  16. #define LEDA_X_BASIC_H
  17.  
  18. // basic graphics operations used in the LEDA window & panel classes
  19.  
  20. #include "impl_x_window.h"
  21.  
  22. /* display */
  23.  
  24. void open_display(void);
  25. void close_display(void);
  26. void flush_display(void);
  27. int  display_width(void);
  28. int  display_height(void);
  29. int  display_depth(void);
  30.  
  31.  
  32. /* windows */
  33.  
  34. LWindow open_window(int x,int y,int width,int height,int bg_col, 
  35.                    const char* header, const char* label);
  36. void close_window(LWindow win);
  37. void clear_window(LWindow win);
  38. int  window_height(LWindow win);
  39. int  window_width(LWindow win);
  40. void window_position(LWindow win, int* x, int* y);
  41. void set_header(LWindow win, const char *s);
  42. void set_redraw(LWindow,void (*f)());
  43.  
  44.  
  45.  
  46. /* drawing */
  47.  
  48. void pixel(LWindow win, int x, int y);
  49. void pixels(LWindow win, int n, int* x, int* y);
  50. void line(LWindow win, int x1, int y1, int x2, int y2);
  51. void rectangle(LWindow win, int x1, int y1, int x2, int y2);
  52. void box(LWindow win, int x1, int y1, int x2, int y2);
  53. void arc(LWindow win,int x0,int y0,int r1,int r2,double start,double angle);
  54. void circle(LWindow win, int x0, int y0, int r);
  55. void ellipse(LWindow win, int x0, int y0, int r1, int r2);
  56. void fill_arc(LWindow win,int x0,int y0,int r1,int r2,double start,double angle);
  57. void fill_circle(LWindow win, int x0, int y0, int r);
  58. void fill_ellipse(LWindow win, int x0, int y0, int r1, int r2);
  59. void fill_polygon(LWindow win, int n, int* xcoord, int* ycoord);
  60. void put_text(LWindow win, int x, int y, const char* s, int opaque);
  61. void put_text(LWindow win, int x, int y, const char* s, int l, int opaque);
  62. void put_ctext(LWindow win, int x, int y, const char* s, int opaque);
  63.  
  64. char* create_pixrect(LWindow win, int x1, int y1, int x2, int y2);
  65. void insert_pixrect(LWindow win, int x, int y, char* rect);
  66. void delete_pixrect(char* rect);
  67. void copy_pixrect(LWindow win, int x1, int y1, int x2, int y2, int x, int y);
  68.  
  69. void insert_bitmap(LWindow win, int width, int height, char* data);
  70. void show_coordinates(LWindow win, const char* s);
  71.  
  72.  
  73. /* fonts and text */
  74.  
  75. int  load_text_font(const char* font_name);
  76. int  load_bold_font(const char* font_name);
  77. int  load_message_font(const char* font_name);
  78. int  set_font(const char* fname);
  79. void set_text_font(void);
  80. void set_bold_font(void);
  81. void set_message_font(void);
  82. int text_width(const char* s);
  83. int text_height(const char* s);
  84.  
  85.  
  86. /* drawing parameters */
  87.  
  88. int  set_color(int col);
  89. int  set_mode(int m);
  90. int  set_line_width(int w);
  91. int  set_line_style(int s);
  92. void set_read_gc(void);
  93. void reset_gc(void);
  94.  
  95.  
  96. /* colors */
  97.  
  98. void set_palette(int,int,int,int);
  99. int  new_color(const char*);
  100.  
  101.  
  102. /* events */
  103.  
  104. int  get_next_event(LWindow* win, int* val, int* x, int* y, unsigned long *t);
  105. int  check_next_event(LWindow* win, int* val, int* x, int* y, unsigned long *t);
  106. void put_back_event(void);
  107.  
  108.  
  109. #endif
  110.